﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    class Vote
    {
        public int count;
        public void clear()
        {
             count = 0;
        }
        public  void increment()
        {
             count++;
        }
        public  void decrement()
        {
             count--;
        }
    }

    class Candidate
    {
        public string name;
        public Vote vote;
        public int numberOfCandidates;

        public Candidate(string name, Vote vote,int numberOfCandidates)
        {
            this.name = name;
            this.vote = vote;
            this.numberOfCandidates = numberOfCandidates;
        }
    }


   public class Test
    {
        public static void Main(string[] args)
        {
            Vote vote = new Vote();
            Candidate candidate = new Candidate("xiaoming", vote, 3);

            Console.WriteLine("Initial vote count:" + candidate.vote.count);
            candidate.vote.increment();
            Console.WriteLine("Vote count after increment:" + candidate.vote.count);
            candidate.vote.decrement();
            Console.WriteLine("Vote count after decrement:" + candidate.vote.count);
            candidate.vote.clear();
            Console.WriteLine("Vote count after clear:" + candidate.vote.count);




        }
    }
}
